<script setup>
  import {useCounterStore} from '../stores/counter.js' //引入pinia的一个模块
  const counterStore=useCounterStore()  //调用执行

  import { storeToRefs } from 'pinia';
  const {count,doubleCount}=storeToRefs(counterStore)
</script>
<template>
  <div class="about">
    <h1>count:{{ count }}</h1>
   
    <h1>2*Count:{{ doubleCount }}</h1>
    <button @click="counterStore.increment()"> +1</button>
   
  </div>
</template>

<style>
@media (min-width: 1024px) {
  .about {
    min-height: 100vh;
    /* display: flex;
    align-items: center; */
  }
}
</style>
